<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 微信图片分组
 */
class CreateWechatImageGroup extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wechat_image_group', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('分组名');
            $table->tinyInteger('isDefault')->default(0)->comment('是否默认分组,默认分组无法被删除 0=否 1=是');
            $table->integer('total')->default(0)->comment('分组下图片数量');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('wechat_image_group');
    }
}
